import request from '@/util/request'

// 获取详情信息
export function getCommodityDetail(spuRepoId) {
  return request({
    url: `aqs/spuDetail/detail/${spuRepoId}.json`,
    method: 'GET',
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}

// 详情运费计算
export function freightPrepaid(data) {
  return request({
    url: `aqs/spuDetail/freightFee`,
    method: 'POST',
    data,
    baseURL: process.env.VUE_APP_AJS_INDEX
  })
}

// 记录查看联系方式&&查看商家电话浏览记录追踪
export function phoneBrowsingHistory(data) {
  return request({
    url: `/recording/contact`,
    method: 'POST',
    data,
    baseURL: process.env.VUE_APP_AJS_RECORD
  })
}

// 记录查看商品详情&&商品浏览记录追踪
export function goosBrowsingHistory(data) {
  return request({
    url: `/recording/good`,
    method: 'POST',
    data,
    baseURL: process.env.VUE_APP_AJS_RECORD
  })
}
